﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;

namespace Datos
{
    public partial class PurchaseOrderReport : DevExpress.XtraReports.UI.XtraReport
    {
        public PurchaseOrderReport()
        {
            InitializeComponent();
           /*try
            {
                InitializeComponent();
                string cadena = "Data Source=184.168.47.21;Initial Catalog=prod_001;Persist Security Info=True;User ID=C113nt3;Password=Y76t?gb$D_";
                pA_Consultar_PurchaseOrderTableAdapter.Connection = new System.Data.SqlClient.SqlConnection(cadena);
            }
            catch (Exception e)
            {
                Console.WriteLine("Error al llenar los controles de la Orden " + e);
            }*/
            
        }

        public void setReport_Parameters(int id_empresa,int numero_orden)
        {
            try
            {
                string cadena = "Data Source=184.168.47.21;Initial Catalog=prod_001;Persist Security Info=True;User ID=C113nt3;Password=Y76t?gb$D_";
                pA_Consultar_PurchaseOrderTableAdapter.Connection = new System.Data.SqlClient.SqlConnection(cadena);
            }
            catch (Exception e)
            {
                Console.WriteLine("Error al llenar los controles de la Orden " + e);
            }

            pA_Consultar_PurchaseOrderTableAdapter.Fill(report1.PA_Consultar_PurchaseOrder,id_empresa, numero_orden);
        }
    }
}
